<?php
/*
 * Created on Jan 24, 2010
 * Shopping Cart System
 * Owner: Phu Ha
 * To change the template for this generated file go to
 * Window - Preferences - PHPeclipse - PHP - Code Templates
 */

##################################################################
## CONFIGURATION FOR MVC MODEL
##################################################################
define('ROUTER', 'router');


// Implement MVC model
// To rewrite all URL to centralize Request from Browser to index.php only
// Auto load needed class
require_once 'MVCAutoLoadClass.php';
spl_autoload_register(array('MVCAutoLoadClass', 'MVCAutoLoad'));



// Load router of MVC model
$GLOBAL_LOGGER_MVC->info('Initiate MVC model');

require_once 'Registry.php';
$registry = new Registry();
$router = new Router($registry);

$GLOBAL_LOGGER_MVC->info('Route Browser request to specific Controller');
$registry->set(ROUTER, $router);
$router->setPath(CONTROLLERS_CURRENT);
$router->delegate();
 
 
?>
